educode_sales 0.9.10 → 0.9.12
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/stylesheets/educode_sales/app.css +20 -0
- data/app/controllers/educode_sales/businesses_controller.rb +10 -1
- data/app/controllers/educode_sales/sale_trends_controller.rb +237 -33
- data/app/models/educode_sales/sale_trend.rb +8 -1
- data/app/views/educode_sales/activities/edit.html.erb +2 -2
- data/app/views/educode_sales/activities/new.html.erb +2 -2
- data/app/views/educode_sales/businesses/_follows.html.erb +3 -3
- data/app/views/educode_sales/businesses/get_export_data.json.jbuilder +12 -0
- data/app/views/educode_sales/businesses/index.html.erb +74 -38
- data/app/views/educode_sales/businesses/index.json.jbuilder +13 -0
- data/app/views/educode_sales/customers/index.html.erb +1 -1
- data/app/views/educode_sales/money_plans/index.html.erb +2 -2
- data/app/views/educode_sales/places/edit.html.erb +1 -1
- data/app/views/educode_sales/places/index.html.erb +1 -1
- data/app/views/educode_sales/places/new.html.erb +1 -1
- data/app/views/educode_sales/sale_trends/_business_area.html.erb +6 -0
- data/app/views/educode_sales/sale_trends/_sales_analysis.html.erb +2 -1
- data/app/views/educode_sales/staffs/index.html.erb +1 -1
- data/app/views/educode_sales/teachers/index.html.erb +2 -2
- data/lib/educode_sales/version.rb +1 -1
- metadata +6 -7
- data/app/assets/images/educode_sales/indexlogo.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 518dc2f8c5a04be4e9865d17425ef4e3f51624fef4994db928233361ec5a9ac9
|
4
|
+
data.tar.gz: 1366d52aaac7c5ac23c4c495a61a46445ac5b99984dcdb2bede6f77bf7307f1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcd5a2e3f17724446da729dd715201550ad4b8719ec68238ad39ce87ca2b37d1fb2f993cdbae4ec7e71e2a8afa80958e08d469150f3a229ea8394f83d8def798
|
7
|
+
data.tar.gz: 4ba4ac0b4b3ba8d62b53152d6d58056245e07b6e32305aa1b8bc77dca6e05f5b53f2a7f510db69fab4dc26017a43245e6f615c3f5512297ee29dbd950c8dce6e
|
@@ -294,4 +294,24 @@ td .layui-table-cell .layui-form-select {
|
|
294
294
|
height: 6px;
|
295
295
|
border-radius: 6px;
|
296
296
|
background-color: red;
|
297
|
+
}
|
298
|
+
|
299
|
+
.gray-text {
|
300
|
+
color: #888;
|
301
|
+
}
|
302
|
+
.red-tips {
|
303
|
+
margin-left: 15px;
|
304
|
+
position: relative;
|
305
|
+
color: #888;
|
306
|
+
}
|
307
|
+
|
308
|
+
.red-tips::before {
|
309
|
+
width: 6px;
|
310
|
+
height: 6px;
|
311
|
+
border-radius: 3px;
|
312
|
+
content: " ";
|
313
|
+
background-color: red;
|
314
|
+
position: absolute;
|
315
|
+
top: 5px;
|
316
|
+
left: -10px;
|
297
317
|
}
|
@@ -26,6 +26,7 @@ module EducodeSales
|
|
26
26
|
end
|
27
27
|
|
28
28
|
if can?(:create, EducodeSales::SalePlan)
|
29
|
+
# gon.menus << { title: '添加团队建议', event: 'suggest' }
|
29
30
|
gon.menus << { title: '添加周计划', event: 'week' }
|
30
31
|
gon.menus << { title: '添加月计划', event: 'month' }
|
31
32
|
end
|
@@ -48,9 +49,15 @@ module EducodeSales
|
|
48
49
|
gon.export_menus << { title: '导出记录', event: 'export_records' }
|
49
50
|
filter = Filter.find_or_create_by(staff_id: @current_admin.id, clazz: "businesses_list")
|
50
51
|
if filter.extras.present?
|
52
|
+
if filter.extras['area'].nil?
|
53
|
+
filter.extras['area'] = 1
|
54
|
+
filter.extras['property'] = 1
|
55
|
+
filter.extras['sale_way'] = 1
|
56
|
+
end
|
57
|
+
filter.save
|
51
58
|
gon.filter = filter.extras
|
52
59
|
else
|
53
|
-
gon.filter = {}
|
60
|
+
gon.filter = {'area': 1, 'property': 1, 'sale_way': 1}
|
54
61
|
end
|
55
62
|
end
|
56
63
|
format.json do
|
@@ -74,6 +81,8 @@ module EducodeSales
|
|
74
81
|
@year = params[:q][:name].split("-")[1].present? ? params[:q][:name].split("-")[1] : ''
|
75
82
|
end
|
76
83
|
|
84
|
+
@budget_stage_ids = Common.where(clazz: '商机阶段', name: ['初步接洽', '准备方案','已交方案', '已立项']).pluck(:id)
|
85
|
+
|
77
86
|
if params[:q].present? && params[:q][:name].present? && params[:q][:name] == "(销售态势-" + @year + "-现有商机)"
|
78
87
|
ids = Common.where(extras: %w[a_class b_class c_class d_class e_class o_class]).pluck(:id)
|
79
88
|
if @year == '全部'
|
@@ -11,7 +11,7 @@ module EducodeSales
|
|
11
11
|
x = Common.find_by(extras: EducodeSales::Common::XTYPE)&.id
|
12
12
|
o = Common.find_by(extras: EducodeSales::Common::OTYPE)&.id
|
13
13
|
if (@year == '全部')
|
14
|
-
@business_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ?", x).sum(:total_amount).round(2)
|
14
|
+
@business_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ? AND educode_sales_follow_ups.clazz_id != ?", x, o).sum(:total_amount).round(2)
|
15
15
|
stage_ids = Common.where(clazz: '商机阶段', name: ['已中标', '已签单', '已验收', '回款中', '服务中', '已结束']).pluck(:id)
|
16
16
|
# 中标总金额, 已回款总金额
|
17
17
|
total_return = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ?", x).where("educode_sales_follow_ups.stage_id IN (?)", stage_ids).select("sum(total_amount) AS total, sum(educode_sales_businesses.return_money) AS return_money")
|
@@ -34,7 +34,7 @@ module EducodeSales
|
|
34
34
|
year_over_time = "#{@year}-12-31 23:59:59"
|
35
35
|
|
36
36
|
@sale_trend = SaleTrend.find_or_create_by(year: @year)
|
37
|
-
@business_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ?", x).where("educode_sales_follow_ups.year = ?", @year).sum(:total_amount).round(2)
|
37
|
+
@business_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ? AND educode_sales_follow_ups.clazz_id != ?", x, o).where("educode_sales_follow_ups.year = ?", @year).sum(:total_amount).round(2)
|
38
38
|
stage_ids = Common.where(clazz: '商机阶段', name: ['已中标', '已签单', '已验收', '回款中', '服务中', '已结束']).pluck(:id)
|
39
39
|
|
40
40
|
# 中标总金额, 已回款总金额
|
@@ -46,8 +46,12 @@ module EducodeSales
|
|
46
46
|
@service_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ?", x).where("educode_sales_follow_ups.signed_date >= ? AND educode_sales_follow_ups.signed_date <= ? AND educode_sales_follow_ups.stage_id IN (?)", "#{@year}-01-01", "#{@year}-12-31", s_stage_ids).sum(:total_amount).round(2)
|
47
47
|
@actual_service_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ?", x).where("educode_sales_follow_ups.signed_date >= ? AND educode_sales_follow_ups.signed_date <= ? AND educode_sales_follow_ups.stage_id IN (?)", "#{@year}-01-01", "#{@year}-12-31", s_stage_ids).sum(:actual_amount).round(2)
|
48
48
|
@return_amount = Business.joins(last_follow_up: :money_plans).where("educode_sales_follow_ups.clazz_id != ?", x).where.not("educode_sales_money_plans.clazz!= ?", 1).where("educode_sales_money_plans.date_at >= ? AND educode_sales_money_plans.date_at <= ? ", year_time, year_over_time).sum(:amount).round(2)
|
49
|
-
|
50
|
-
|
49
|
+
|
50
|
+
# 往年累计已中标合同
|
51
|
+
@former_goal_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id != ?", x).where("educode_sales_follow_ups.bidded_date <= ? AND educode_sales_follow_ups.stage_id IN (?)", "#{@year}-12-31", stage_ids).sum(:actual_amount).round(2)
|
52
|
+
# 往年累计已回款
|
53
|
+
@former_return_amount = Business.joins(last_follow_up: :money_plans).where("educode_sales_follow_ups.clazz_id != ?", x).where.not("educode_sales_money_plans.clazz!= ?", 1).where("educode_sales_money_plans.date_at <= ? ", year_over_time).sum(:amount).round(2)
|
54
|
+
@receivable_amount = @former_goal_amount - @former_return_amount
|
51
55
|
|
52
56
|
a = Common.where(clazz: '商机类型', name: Common.find_by(extras: EducodeSales::Common::ATYPE)&.name).pluck(:id)
|
53
57
|
@a_amount = Business.joins(:last_follow_up).where("educode_sales_follow_ups.clazz_id IN (?)", a).where("educode_sales_follow_ups.year = ?", @year).sum(:total_amount).round(2)
|
@@ -85,7 +89,7 @@ module EducodeSales
|
|
85
89
|
end
|
86
90
|
format.js do
|
87
91
|
default_dates = (30.day.ago.to_date..Date.today).map { |d| d.strftime("%Y-%W") }.uniq #默认时间范围
|
88
|
-
@follow_count_data = business_followup_charts(default_dates, names, x_business_ids, SaleTrend::COLORS, [30.day.ago.to_date.beginning_of_week, Date.today], "%Y
|
92
|
+
@follow_count_data = business_followup_charts(default_dates, names, x_business_ids, SaleTrend::COLORS, [30.day.ago.to_date.beginning_of_week, Date.today], "%Y%u") do |default_dates|
|
89
93
|
default_dates.map { |date|
|
90
94
|
d = date.split("-")
|
91
95
|
year = d[0].to_i
|
@@ -172,7 +176,7 @@ module EducodeSales
|
|
172
176
|
|
173
177
|
goal_default_dates = ("#{Time.now.year}-01-01".to_date.."#{Time.now.year}-#{Time.now.month}-01".to_date).map { |d| d.strftime("%Y-%m") }.uniq
|
174
178
|
sale_names = ['已中标', '已签单', '已回款']
|
175
|
-
|
179
|
+
|
176
180
|
if params[:goal_count_range].present?
|
177
181
|
case params[:goal_count_range]
|
178
182
|
when "week"
|
@@ -180,16 +184,23 @@ module EducodeSales
|
|
180
184
|
if params[:goal_date_month].present?
|
181
185
|
date = params[:goal_date_month].split(" - ")
|
182
186
|
dates = ((date[0] + "-01").to_date..(date[1] + "-01").to_date).map { |d| d.strftime("%Y-%m") }.uniq
|
183
|
-
@goal_count_data = month_sale_chart(dates, sale_names, SaleTrend::COLORS, x, stage_ids, s_stage_ids, count_type)
|
187
|
+
@goal_count_data = month_sale_chart(dates, sale_names, SaleTrend::COLORS, x, stage_ids, s_stage_ids, count_type, date)
|
188
|
+
else
|
189
|
+
@goal_count_data = month_sale_chart(goal_default_dates, sale_names, SaleTrend::COLORS, x, stage_ids, s_stage_ids, count_type, ["#{Time.now.year}-01", "#{Time.now.year}-#{Time.now.month}"])
|
184
190
|
end
|
185
191
|
else
|
186
192
|
#按年
|
187
193
|
if params[:goal_date_year].present?
|
188
194
|
date = params[:goal_date_year].split(" - ")
|
189
195
|
dates = (date[0]..date[1]).to_a
|
190
|
-
@goal_count_data = year_sale_chart(dates, sale_names, SaleTrend::COLORS, x, stage_ids, s_stage_ids, count_type)
|
196
|
+
@goal_count_data = year_sale_chart(dates, sale_names, SaleTrend::COLORS, x, stage_ids, s_stage_ids, count_type, date)
|
197
|
+
else
|
198
|
+
goal_default_dates = ("#{Time.now.year}-01-01".to_date.."#{Time.now.year}-#{Time.now.month}-01".to_date).map { |d| d.strftime("%Y") }.uniq
|
199
|
+
@goal_count_data = year_sale_chart(goal_default_dates, sale_names, SaleTrend::COLORS, x, stage_ids, s_stage_ids, count_type, ["#{Time.now.year}", "#{Time.now.year}"])
|
191
200
|
end
|
192
201
|
end
|
202
|
+
else
|
203
|
+
@goal_count_data = month_sale_chart(goal_default_dates, sale_names, SaleTrend::COLORS, x, stage_ids, s_stage_ids, count_type, ["#{Time.now.year}-01", "#{Time.now.year}-#{Time.now.month}"])
|
193
204
|
end
|
194
205
|
end
|
195
206
|
end
|
@@ -203,20 +214,25 @@ module EducodeSales
|
|
203
214
|
end
|
204
215
|
format.js do
|
205
216
|
x = EducodeSales::Common.find_by(extras: EducodeSales::Common::XTYPE)&.id
|
217
|
+
o = Common.find_by(extras: EducodeSales::Common::OTYPE)&.id
|
206
218
|
provinces = EducodeSales::Common.where(clazz: 'area').pluck(:name)
|
207
219
|
if params[:business_count_type] == 'money' || params[:business_count_type].blank?
|
220
|
+
data = provinces.map { |province|
|
221
|
+
if params[:business_type].blank?
|
222
|
+
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id != ? AND educode_sales_follow_ups.clazz_id != ?", x, o).sum(:total_amount).round(2)
|
223
|
+
else
|
224
|
+
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id = ?", params[:business_type]).sum(:total_amount).round(2)
|
225
|
+
end
|
226
|
+
}
|
227
|
+
if params[:sort_by].present?
|
228
|
+
data.sort! { |a, b| params[:sort_by] == 'asc' ? a <=> b : b <=> a }
|
229
|
+
end
|
208
230
|
@business_data = {
|
209
231
|
labels: provinces,
|
210
232
|
datasets: [
|
211
233
|
{
|
212
234
|
label: "商机总额",
|
213
|
-
data:
|
214
|
-
if params[:business_type].blank?
|
215
|
-
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id != ?", x).sum(:total_amount).round(2)
|
216
|
-
else
|
217
|
-
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id = ?", params[:business_type]).sum(:total_amount).round(2)
|
218
|
-
end
|
219
|
-
},
|
235
|
+
data: data,
|
220
236
|
backgroundColor: SaleTrend::COLORS[0],
|
221
237
|
borderColor: SaleTrend::COLORS[0],
|
222
238
|
borderWidth: 1
|
@@ -224,18 +240,22 @@ module EducodeSales
|
|
224
240
|
]
|
225
241
|
}
|
226
242
|
else
|
243
|
+
data = provinces.map { |province|
|
244
|
+
if params[:business_type].blank?
|
245
|
+
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id != ? AND educode_sales_follow_ups.clazz_id != ?", x, o).count
|
246
|
+
else
|
247
|
+
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id = ?", params[:business_type]).count
|
248
|
+
end
|
249
|
+
}
|
250
|
+
if params[:sort_by].present?
|
251
|
+
data.sort! { |a, b| params[:sort_by] == 'asc' ? a <=> b : b <=> a }
|
252
|
+
end
|
227
253
|
@business_data = {
|
228
254
|
labels: provinces,
|
229
255
|
datasets: [
|
230
256
|
{
|
231
257
|
label: "商机数量",
|
232
|
-
data:
|
233
|
-
if params[:business_type].blank?
|
234
|
-
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id != ?", x).count
|
235
|
-
else
|
236
|
-
Business.joins(:last_follow_up).where("educode_sales_businesses.department_id in (?)", School.joins(:departments).where(province: province).pluck("departments.id")).where("educode_sales_follow_ups.clazz_id = ?", params[:business_type]).count
|
237
|
-
end
|
238
|
-
},
|
258
|
+
data: data,
|
239
259
|
backgroundColor: SaleTrend::COLORS[0],
|
240
260
|
borderColor: SaleTrend::COLORS[0],
|
241
261
|
borderWidth: 1
|
@@ -351,9 +371,9 @@ module EducodeSales
|
|
351
371
|
hidden: name[2] == 11, #role_id:11 离职角色
|
352
372
|
data: dates.map { |date| data["#{name[1]}-#{ date.gsub("-", '')}"]&.[](0)&.[]('counts') || 0 },
|
353
373
|
backgroundColor: "#fff",
|
354
|
-
pointBorderColor: colors[i %
|
355
|
-
borderColor: colors[i %
|
356
|
-
pointBackgroundColor: colors[i %
|
374
|
+
pointBorderColor: colors[i % 50 + 1],
|
375
|
+
borderColor: colors[i % 50 + 1],
|
376
|
+
pointBackgroundColor: colors[i % 50 + 1],
|
357
377
|
borderWidth: 2
|
358
378
|
}
|
359
379
|
end
|
@@ -361,7 +381,88 @@ module EducodeSales
|
|
361
381
|
end
|
362
382
|
|
363
383
|
|
364
|
-
def month_sale_chart(dates, names, colors, x, stage_ids, s_stage_ids, count_type)
|
384
|
+
def month_sale_chart(dates, names, colors, x, stage_ids, s_stage_ids, count_type, range)
|
385
|
+
begin_at = range[0].split("-")
|
386
|
+
end_at = range[1].split("-")
|
387
|
+
|
388
|
+
begin_at = DateTime.new begin_at[0].to_i, begin_at[1].to_i
|
389
|
+
end_at = DateTime.new end_at[0].to_i, end_at[1].to_i
|
390
|
+
data_1 = EducodeSales::Business.joins(:last_follow_up).
|
391
|
+
where("educode_sales_follow_ups.clazz_id != ?", x).
|
392
|
+
where("educode_sales_follow_ups.stage_id IN (?)", stage_ids).
|
393
|
+
where("educode_sales_follow_ups.bidded_date >= ? AND educode_sales_follow_ups.bidded_date <= ?", begin_at, end_at).
|
394
|
+
select("SUM(#{count_type}) AS count_type, DATE_FORMAT(bidded_date, '%Y-%m') AS month").
|
395
|
+
group("DATE_FORMAT(bidded_date, '%Y-%m')").
|
396
|
+
order("DATE_FORMAT(bidded_date, '%Y-%m')")
|
397
|
+
data_1_hash = {}
|
398
|
+
data_1_total_hash = {}
|
399
|
+
data_1.each do |d|
|
400
|
+
data_1_hash[d.month] = d.count_type.round(2)
|
401
|
+
end
|
402
|
+
|
403
|
+
last_month = 0
|
404
|
+
last_sum = 0
|
405
|
+
dates.each do |month|
|
406
|
+
# 只累计当前年份
|
407
|
+
if last_month != month.split("-")[0]
|
408
|
+
last_sum = 0
|
409
|
+
end
|
410
|
+
data_1_total_hash[month] = (data_1_hash[month] || 0) + last_sum
|
411
|
+
last_sum += data_1_hash[month] || 0
|
412
|
+
last_month = month.split("-")[0]
|
413
|
+
end
|
414
|
+
|
415
|
+
data_2 = EducodeSales::Business.joins(:last_follow_up).
|
416
|
+
where("educode_sales_follow_ups.clazz_id != ?", x).
|
417
|
+
where("educode_sales_follow_ups.stage_id IN (?)", s_stage_ids).
|
418
|
+
where("educode_sales_follow_ups.signed_date >= ? AND educode_sales_follow_ups.signed_date <= ?", begin_at, end_at).
|
419
|
+
select("SUM(#{count_type}) AS count_type, DATE_FORMAT(signed_date, '%Y-%m') AS month").
|
420
|
+
group("DATE_FORMAT(signed_date, '%Y-%m')").
|
421
|
+
order("DATE_FORMAT(signed_date, '%Y-%m')")
|
422
|
+
data_2_hash = {}
|
423
|
+
data_2_total_hash = {}
|
424
|
+
data_2.each do |d|
|
425
|
+
data_2_hash[d.month] = d.count_type.round(2)
|
426
|
+
end
|
427
|
+
|
428
|
+
last_month = 0
|
429
|
+
last_sum = 0
|
430
|
+
dates.each do |month|
|
431
|
+
# 只累计当前年份
|
432
|
+
if last_month != month.split("-")[0]
|
433
|
+
last_sum = 0
|
434
|
+
end
|
435
|
+
data_2_total_hash[month] = (data_2_hash[month] || 0) + last_sum
|
436
|
+
last_sum += data_2_hash[month] || 0
|
437
|
+
last_month = month.split("-")[0]
|
438
|
+
end
|
439
|
+
|
440
|
+
data_3 = EducodeSales::Business.joins(last_follow_up: :money_plans).
|
441
|
+
where("educode_sales_follow_ups.clazz_id != ?", x).
|
442
|
+
where.not("educode_sales_money_plans.clazz!= ?", 1).
|
443
|
+
where("educode_sales_money_plans.date_at >= ? AND educode_sales_money_plans.date_at <= ?", begin_at, end_at).
|
444
|
+
select("SUM(amount) AS count_type, DATE_FORMAT(date_at, '%Y-%m') AS month").
|
445
|
+
group("DATE_FORMAT(date_at, '%Y-%m')").
|
446
|
+
order("DATE_FORMAT(date_at, '%Y-%m')")
|
447
|
+
data_3_hash = {}
|
448
|
+
data_3.each do |d|
|
449
|
+
data_3_hash[d.month] = d.count_type.round(2)
|
450
|
+
end
|
451
|
+
|
452
|
+
data_3_total_hash = {}
|
453
|
+
last_month = 0
|
454
|
+
last_sum = 0
|
455
|
+
dates.each do |month|
|
456
|
+
# 只累计当前年份
|
457
|
+
if last_month != month.split("-")[0]
|
458
|
+
last_sum = 0
|
459
|
+
end
|
460
|
+
data_3_total_hash[month] = (data_3_hash[month] || 0) + last_sum
|
461
|
+
last_sum += data_3_hash[month] || 0
|
462
|
+
last_month = month.split("-")[0]
|
463
|
+
end
|
464
|
+
|
465
|
+
|
365
466
|
{
|
366
467
|
labels: dates,
|
367
468
|
datasets: names.map.with_index do |name, i|
|
@@ -370,11 +471,21 @@ module EducodeSales
|
|
370
471
|
data: dates.map { |d|
|
371
472
|
case i
|
372
473
|
when 0
|
373
|
-
|
474
|
+
data_1_hash[d] || 0
|
475
|
+
when 1
|
476
|
+
data_2_hash[d] || 0
|
477
|
+
else
|
478
|
+
data_3_hash[d] || 0
|
479
|
+
end
|
480
|
+
},
|
481
|
+
data1: dates.map { |d|
|
482
|
+
case i
|
483
|
+
when 0
|
484
|
+
data_1_total_hash[d] || 0
|
374
485
|
when 1
|
375
|
-
|
486
|
+
data_2_total_hash[d] || 0
|
376
487
|
else
|
377
|
-
|
488
|
+
data_3_total_hash[d] || 0
|
378
489
|
end
|
379
490
|
},
|
380
491
|
backgroundColor: colors[i],
|
@@ -385,7 +496,90 @@ module EducodeSales
|
|
385
496
|
}
|
386
497
|
end
|
387
498
|
|
388
|
-
def year_sale_chart(dates, names, colors, x, stage_ids, s_stage_ids, count_type)
|
499
|
+
def year_sale_chart(dates, names, colors, x, stage_ids, s_stage_ids, count_type, range)
|
500
|
+
begin_at = range[0].split("-")
|
501
|
+
end_at = range[1].split("-")
|
502
|
+
begin_at = DateTime.new(begin_at[0].to_i).beginning_of_year
|
503
|
+
end_at = DateTime.new(end_at[0].to_i).end_of_year
|
504
|
+
|
505
|
+
data_1 = EducodeSales::Business.joins(:last_follow_up).
|
506
|
+
where("educode_sales_follow_ups.clazz_id != ?", x).
|
507
|
+
where("educode_sales_follow_ups.stage_id IN (?)", stage_ids).
|
508
|
+
where("educode_sales_follow_ups.bidded_date >= ? AND educode_sales_follow_ups.bidded_date <= ?", begin_at, end_at).
|
509
|
+
select("SUM(#{count_type}) AS count_type, DATE_FORMAT(bidded_date, '%Y') AS year").
|
510
|
+
group("DATE_FORMAT(bidded_date, '%Y')").
|
511
|
+
order("DATE_FORMAT(bidded_date, '%Y')")
|
512
|
+
data_1_hash = {}
|
513
|
+
data_1.each do |d|
|
514
|
+
data_1_hash[d.year] = d.count_type.round(2)
|
515
|
+
end
|
516
|
+
|
517
|
+
data_1_total_hash = {}
|
518
|
+
last_month = 0
|
519
|
+
last_sum = 0
|
520
|
+
dates.each do |month|
|
521
|
+
# 只累计当前年份
|
522
|
+
if last_month != month.split("-")[0]
|
523
|
+
last_sum = 0
|
524
|
+
end
|
525
|
+
data_1_total_hash[month] = (data_1_hash[month] || 0) + last_sum
|
526
|
+
last_sum += data_1_hash[month] || 0
|
527
|
+
last_month = month.split("-")[0]
|
528
|
+
end
|
529
|
+
|
530
|
+
data_2 = EducodeSales::Business.joins(:last_follow_up).
|
531
|
+
where("educode_sales_follow_ups.clazz_id != ?", x).
|
532
|
+
where("educode_sales_follow_ups.stage_id IN (?)", s_stage_ids).
|
533
|
+
where("educode_sales_follow_ups.signed_date >= ? AND educode_sales_follow_ups.signed_date <= ?", begin_at, end_at).
|
534
|
+
select("SUM(#{count_type}) AS count_type, DATE_FORMAT(signed_date, '%Y') AS year").
|
535
|
+
group("DATE_FORMAT(signed_date, '%Y')").
|
536
|
+
order("DATE_FORMAT(signed_date, '%Y')")
|
537
|
+
data_2_hash = {}
|
538
|
+
data_2.each do |d|
|
539
|
+
data_2_hash[d.year] = d.count_type.round(2)
|
540
|
+
end
|
541
|
+
|
542
|
+
data_2_total_hash = {}
|
543
|
+
last_month = 0
|
544
|
+
last_sum = 0
|
545
|
+
dates.each do |month|
|
546
|
+
# 只累计当前年份
|
547
|
+
if last_month != month.split("-")[0]
|
548
|
+
last_sum = 0
|
549
|
+
end
|
550
|
+
data_2_total_hash[month] = (data_2_hash[month] || 0) + last_sum
|
551
|
+
last_sum += data_2_hash[month] || 0
|
552
|
+
last_month = month.split("-")[0]
|
553
|
+
end
|
554
|
+
|
555
|
+
data_3 = EducodeSales::Business.joins(last_follow_up: :money_plans).
|
556
|
+
where("educode_sales_follow_ups.clazz_id != ?", x).
|
557
|
+
where.not("educode_sales_money_plans.clazz!= ?", 1).
|
558
|
+
where("educode_sales_money_plans.date_at >= ? AND educode_sales_money_plans.date_at <= ?", begin_at, end_at).
|
559
|
+
select("SUM(amount) AS count_type, DATE_FORMAT(date_at, '%Y') AS year").
|
560
|
+
group("DATE_FORMAT(date_at, '%Y')").
|
561
|
+
order("DATE_FORMAT(date_at, '%Y')")
|
562
|
+
data_3_hash = {}
|
563
|
+
data_3.each do |d|
|
564
|
+
data_3_hash[d.year] = d.count_type.round(2)
|
565
|
+
end
|
566
|
+
|
567
|
+
data_3_total_hash = {}
|
568
|
+
last_month = 0
|
569
|
+
last_sum = 0
|
570
|
+
dates.each do |month|
|
571
|
+
# 只累计当前年份
|
572
|
+
if last_month != month.split("-")[0]
|
573
|
+
last_sum = 0
|
574
|
+
end
|
575
|
+
|
576
|
+
data_3_total_hash[month] = (data_3_hash[month] || 0) + last_sum
|
577
|
+
last_sum += data_3_hash[month] || 0
|
578
|
+
last_month = month.split("-")[0]
|
579
|
+
end
|
580
|
+
|
581
|
+
|
582
|
+
|
389
583
|
{
|
390
584
|
labels: dates,
|
391
585
|
datasets: names.map.with_index do |name, i|
|
@@ -394,12 +588,22 @@ module EducodeSales
|
|
394
588
|
data: dates.map { |d|
|
395
589
|
case i
|
396
590
|
when 0
|
397
|
-
|
591
|
+
data_1_hash[d] || 0
|
398
592
|
when 1
|
399
|
-
|
593
|
+
data_2_hash[d] || 0
|
400
594
|
else
|
401
|
-
|
595
|
+
data_3_hash[d]|| 0
|
402
596
|
end },
|
597
|
+
data1: dates.map { |d|
|
598
|
+
case i
|
599
|
+
when 0
|
600
|
+
data_1_total_hash[d] || 0
|
601
|
+
when 1
|
602
|
+
data_2_total_hash[d] || 0
|
603
|
+
else
|
604
|
+
data_3_total_hash[d] || 0
|
605
|
+
end
|
606
|
+
},
|
403
607
|
backgroundColor: colors[i],
|
404
608
|
borderColor: colors[i],
|
405
609
|
borderWidth: 1
|
@@ -1,6 +1,13 @@
|
|
1
1
|
module EducodeSales
|
2
2
|
class SaleTrend < ApplicationRecord
|
3
3
|
|
4
|
-
COLORS = [
|
4
|
+
COLORS = [
|
5
|
+
'#44D7B6', '#4CACFF', '#F7B500', '#FF0000', '#FF7F00', '#FFFF00', '#00FF00', '#00FFFF', '#0000FF',
|
6
|
+
'#8B00FF', 'rgba(255, 99, 132, 1)', 'rgba(54, 162, 235, 1)', 'rgba(255, 206, 86, 1)', 'rgba(75, 192, 192, 1)',
|
7
|
+
'rgba(153, 102, 255, 1)', 'rgba(255, 159, 64, 1)', 'rgba(255, 0, 250, 1)', '#A2D9CE', '#D6EAF8', '#E8DAEF', '#FADBD8',
|
8
|
+
'#F5B7B1', '#E6B0AA', '#FCF3CF', '#FDEBD0', '#F6DDCC', '#D98880', '#EC7063', '#A569BD', '#85C1E9', '#45B39D', '#F7DC6F',
|
9
|
+
'#DC7633', '#839192', '#6C3483', '#B03A2E', '#7B7D7D', '#4D5656', '#28B463', '#0E6655', '#F39C12', '#0E6251', '#1B4F72',
|
10
|
+
'#FAE5D3', '#82E0AA', '#FF00FF', '#663399', '#4B0082', '#7CFC00', '#48D1CC'
|
11
|
+
]
|
5
12
|
end
|
6
13
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="layui-inline">
|
6
6
|
<label class="layui-form-label required">活动名称</label>
|
7
7
|
<div class="layui-input-block">
|
8
|
-
<input type="text" name="name" required lay-verify="required"
|
8
|
+
<input type="text" name="name" required lay-verify="required"
|
9
9
|
class="layui-input" value="<%= @activity.name %>">
|
10
10
|
</div>
|
11
11
|
</div>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<div class="layui-inline">
|
20
20
|
<label class="layui-form-label required">活动天数</label>
|
21
21
|
<div class="layui-input-block">
|
22
|
-
<input type="text" name="days" required lay-verify="required"
|
22
|
+
<input type="text" name="days" required lay-verify="required"
|
23
23
|
class="layui-input" value="<%= @activity.days %>">
|
24
24
|
</div>
|
25
25
|
</div>
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="layui-inline">
|
6
6
|
<label class="layui-form-label required">活动名称</label>
|
7
7
|
<div class="layui-input-block">
|
8
|
-
<input type="text" name="name" required lay-verify="required"
|
8
|
+
<input type="text" name="name" required lay-verify="required" placeholder="请输入"
|
9
9
|
class="layui-input" id="inputFocus">
|
10
10
|
</div>
|
11
11
|
</div>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<div class="layui-inline">
|
19
19
|
<label class="layui-form-label required">活动天数</label>
|
20
20
|
<div class="layui-input-block">
|
21
|
-
<input type="text" name="days" required lay-verify="required"
|
21
|
+
<input type="text" name="days" required lay-verify="required"
|
22
22
|
class="layui-input">
|
23
23
|
</div>
|
24
24
|
</div>
|
@@ -4,13 +4,13 @@
|
|
4
4
|
<div class="layui-inline">
|
5
5
|
<label class="layui-form-label">所属商机</label>
|
6
6
|
<div class="layui-input-inline">
|
7
|
-
<input type="text" name="name"
|
7
|
+
<input type="text" name="name" class="layui-input">
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="layui-inline">
|
11
11
|
<label class="layui-form-label">单位</label>
|
12
12
|
<div class="layui-input-inline">
|
13
|
-
<input type="text" name="department"
|
13
|
+
<input type="text" name="department" class="layui-input">
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<div class="layui-inline">
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<div class="layui-inline">
|
35
35
|
<label class="layui-form-label">最新进展</label>
|
36
36
|
<div class="layui-input-inline">
|
37
|
-
<input type="text" name="description"
|
37
|
+
<input type="text" name="description" class="layui-input">
|
38
38
|
</div>
|
39
39
|
</div>
|
40
40
|
|
@@ -23,6 +23,18 @@ json.data do
|
|
23
23
|
break
|
24
24
|
end
|
25
25
|
end
|
26
|
+
json.area d.department.school.province
|
27
|
+
school_property = d.department.school.school_property
|
28
|
+
property = []
|
29
|
+
|
30
|
+
if school_property.present?
|
31
|
+
property << '本科地方院校' if school_property.regular_college || school_property.project_985 || school_property.project_211
|
32
|
+
property << '高职' if school_property.junior_college || school_property.secondary_school
|
33
|
+
property << '本科军校' if school_property.military_school
|
34
|
+
property << '企业' if school_property.enterprise
|
35
|
+
end
|
36
|
+
json.property property.join("、")
|
37
|
+
json.sale_way d.last_follow_up&.place&.name.present? ? '渠道' : '直销'
|
26
38
|
json.actual_amount d.last_follow_up&.actual_amount.to_f.round(2)
|
27
39
|
json.return_money d.return_money
|
28
40
|
json.wait_return_money d.wait_return_money.to_f.round(2)
|
@@ -17,14 +17,14 @@
|
|
17
17
|
<div class="layui-inline">
|
18
18
|
<label class="layui-form-label">商机名称</label>
|
19
19
|
<div class="layui-input-inline">
|
20
|
-
<input type="text" name="name"
|
21
|
-
<input type="text" style="display: none" name="place_id"
|
20
|
+
<input type="text" name="name" class="layui-input" value="<%=params[:name] %>">
|
21
|
+
<input type="text" style="display: none" name="place_id" class="layui-input" value="<%=params[:place_id] %>">
|
22
22
|
</div>
|
23
23
|
</div>
|
24
24
|
<div class="layui-inline">
|
25
25
|
<label class="layui-form-label">单位</label>
|
26
26
|
<div class="layui-input-inline">
|
27
|
-
<input type="text" name="department"
|
27
|
+
<input type="text" name="department" value="<%=params[:school] %>" class="layui-input">
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
<div class="layui-inline">
|
@@ -92,7 +92,9 @@
|
|
92
92
|
</div>
|
93
93
|
</form>
|
94
94
|
</div>
|
95
|
-
<
|
95
|
+
<div id="businesses_table_wraper">
|
96
|
+
<table class="layui-hide" id="businesses_table" lay-filter="businesses_table"></table>
|
97
|
+
</div>
|
96
98
|
</div>
|
97
99
|
</div>
|
98
100
|
</div>
|
@@ -100,6 +102,8 @@
|
|
100
102
|
<script type="text/html" id="bussinessBar">
|
101
103
|
<div class="layui-btn-container">
|
102
104
|
<span class="table-label">商机列表</span>
|
105
|
+
<span class="table-label gray-text">(</span>
|
106
|
+
<span class="table-label red-tips">标记该商机类型已被更改过)</span>
|
103
107
|
<% if can?(:export_business, EducodeSales::Business) %>
|
104
108
|
<button class="layui-btn layui-btn-primary layui-border-green layui-btn-sm data-count-edit export_more-btn pull-right" style="color: #0000ff;" data-name="export" data-id="export">导出<i class="layui-icon layui-icon-down layui-nav-more" style="font-size: 12px"></i></button>
|
105
109
|
<% end %>
|
@@ -176,7 +180,7 @@
|
|
176
180
|
miniPage = layui.miniPage,
|
177
181
|
dropdown = layui.dropdown,
|
178
182
|
laydate = layui.laydate;
|
179
|
-
|
183
|
+
var openWH = miniPage.getOpenWidthHeight();
|
180
184
|
laydate.render({
|
181
185
|
elem: '#date',
|
182
186
|
range: true
|
@@ -186,12 +190,10 @@
|
|
186
190
|
range: true
|
187
191
|
});
|
188
192
|
|
189
|
-
//
|
190
|
-
//
|
191
|
-
//
|
192
|
-
//
|
193
|
-
// $(document).ready(function () {
|
194
|
-
// window.onload = hn;
|
193
|
+
// $('#businesses_table_wraper .layui-table-body').on('scroll', function(e) {
|
194
|
+
// var leftPx = $(e.target).scrollLeft(); //获取表格body,滚动条距离左边的长度
|
195
|
+
// var left = 'translateX(-' + leftPx + 'px)';
|
196
|
+
// $('#businesses_table_wraper .layui-table-header .layui-table').css('transform', left); //设置表格header的内容反向(-)移动
|
195
197
|
// });
|
196
198
|
|
197
199
|
var is_show =
|
@@ -259,8 +261,8 @@
|
|
259
261
|
|
260
262
|
|
261
263
|
var data = form.val("search_form");
|
262
|
-
data.business_type = <%=params[:clazz_id] %>
|
263
|
-
|
264
|
+
data.business_type = "<%=params[:clazz_id] %>";
|
265
|
+
|
264
266
|
|
265
267
|
table = layui.table;
|
266
268
|
var cols_table = [
|
@@ -283,10 +285,16 @@
|
|
283
285
|
field: 'name',
|
284
286
|
width: 170,
|
285
287
|
title: '商机名称',
|
286
|
-
templet: '<div><span title="{{d.name}}">{{d.name}}</span></div>',
|
288
|
+
templet: '<div><a href="javascript:void(0);" class="layui-table-link" lay-event="show_business"><span title="{{d.name}}">{{d.name}}</span></a></div>',
|
287
289
|
fixed: 'left',
|
288
290
|
hide: gon.filter.name
|
289
291
|
},
|
292
|
+
{
|
293
|
+
field: 'area',
|
294
|
+
width: 100,
|
295
|
+
title: '地域',
|
296
|
+
hide: gon.filter.area
|
297
|
+
},
|
290
298
|
{
|
291
299
|
field: 'school',
|
292
300
|
width: 150,
|
@@ -294,6 +302,12 @@
|
|
294
302
|
templet: '#school_name',
|
295
303
|
hide: gon.filter.school
|
296
304
|
},
|
305
|
+
{
|
306
|
+
field: 'property',
|
307
|
+
width: 150,
|
308
|
+
title: '客户类型',
|
309
|
+
hide: gon.filter.property
|
310
|
+
},
|
297
311
|
{
|
298
312
|
field: 'department',
|
299
313
|
width: 150,
|
@@ -361,6 +375,13 @@
|
|
361
375
|
sort: true,
|
362
376
|
hide: gon.filter.bidded_date
|
363
377
|
},
|
378
|
+
{
|
379
|
+
field: 'budget_money',
|
380
|
+
width: 105,
|
381
|
+
title: '预算金额',
|
382
|
+
sort: true,
|
383
|
+
hide: gon.filter.budget_money
|
384
|
+
},
|
364
385
|
{
|
365
386
|
field: 'signed_date',
|
366
387
|
width: 105,
|
@@ -433,6 +454,12 @@
|
|
433
454
|
title: '渠道',
|
434
455
|
hide: gon.filter.place
|
435
456
|
},
|
457
|
+
{
|
458
|
+
field: 'sale_way',
|
459
|
+
width: 160,
|
460
|
+
title: '销售方式',
|
461
|
+
hide: gon.filter.sale_way
|
462
|
+
},
|
436
463
|
{
|
437
464
|
field: 'year',
|
438
465
|
width: 105,
|
@@ -478,11 +505,18 @@
|
|
478
505
|
limits: [10,15,20,30,40,50,60,70,80,90],
|
479
506
|
page: true,
|
480
507
|
skin: 'line',
|
481
|
-
done: function (res) {
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
508
|
+
done: function (res, curr, coun) {
|
509
|
+
exportData=res.data;
|
510
|
+
drowpdwonRender();
|
511
|
+
export_drowpdwonRender();
|
512
|
+
// let headerTop = $('.layui-table-header').offset().top; //获取表格头到文档顶部的距离
|
513
|
+
// $(".layuimini-content-page").scroll(function () {
|
514
|
+
// if ((headerTop - $(".layuimini-content-page").scrollTop()) < -185) { //超过了
|
515
|
+
// $('#businesses_table_wraper .layui-table-header').addClass('table-header-fixed'); //添加样式,固定住表头
|
516
|
+
// } else { //没超过
|
517
|
+
// $('#businesses_table_wraper .layui-table-header').removeClass('table-header-fixed'); //移除样式
|
518
|
+
// }
|
519
|
+
// });
|
486
520
|
}
|
487
521
|
});
|
488
522
|
|
@@ -903,7 +937,6 @@
|
|
903
937
|
});
|
904
938
|
}
|
905
939
|
|
906
|
-
|
907
940
|
if (obj.event === 'add') { // 监听添加操作
|
908
941
|
var content = miniPage.getHrefContent('/missions/businesses/new');
|
909
942
|
var openWH = miniPage.getOpenWidthHeight();
|
@@ -1095,24 +1128,27 @@
|
|
1095
1128
|
layer.full(index);
|
1096
1129
|
});
|
1097
1130
|
} else if (obj.event === 'show_follow') {
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1131
|
+
time_line(obj.data.id, obj.data.name);
|
1132
|
+
// self_flag = data.self_flag
|
1133
|
+
// business_id = obj.data.id
|
1134
|
+
// business_name = data.name
|
1135
|
+
// content = miniPage.getHrefContent('/missions/businesses/show_follow?id=' + id);
|
1136
|
+
// openWH = miniPage.getOpenWidthHeight();
|
1137
|
+
// index = layer.open({
|
1138
|
+
// title: '商机列表/' + data.name + '的跟进记录',
|
1139
|
+
// type: 1,
|
1140
|
+
// shade: 0.2,
|
1141
|
+
// maxmin: true,
|
1142
|
+
// shadeClose: true,
|
1143
|
+
// area: [openWH[0] + 'px', openWH[1] + 'px'],
|
1144
|
+
// offset: [openWH[2] + 'px', openWH[3] + 'px'],
|
1145
|
+
// content: content
|
1146
|
+
// });
|
1147
|
+
// $(window).on("resize", function () {
|
1148
|
+
// layer.full(index);
|
1149
|
+
// });
|
1150
|
+
} else if (obj.event == 'show_business') {
|
1151
|
+
time_line(obj.data.id, obj.data.name)
|
1116
1152
|
}
|
1117
1153
|
});
|
1118
1154
|
});
|
@@ -26,6 +26,19 @@ json.data do
|
|
26
26
|
break
|
27
27
|
end
|
28
28
|
end
|
29
|
+
json.budget_money d.follow_ups.where(stage_id: @budget_stage_ids).order("created_at desc").first&.total_amount&.round(2) || 0
|
30
|
+
json.area d.department.school.province
|
31
|
+
school_property = d.department.school.school_property
|
32
|
+
property = []
|
33
|
+
|
34
|
+
if school_property.present?
|
35
|
+
property << '本科地方院校' if school_property.regular_college || school_property.project_985 || school_property.project_211
|
36
|
+
property << '高职' if school_property.junior_college || school_property.secondary_school
|
37
|
+
property << '本科军校' if school_property.military_school
|
38
|
+
property << '企业' if school_property.enterprise
|
39
|
+
end
|
40
|
+
json.property property.join("、")
|
41
|
+
json.sale_way d.last_follow_up&.place&.name.present? ? '渠道' : '直销'
|
29
42
|
json.year d.last_follow_up&.year.to_s
|
30
43
|
json.total_amount d.last_follow_up&.total_amount.to_f.round(2)
|
31
44
|
json.actual_amount d.last_follow_up&.actual_amount.to_f.round(2)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="layui-inline">
|
5
5
|
<label class="layui-form-label">客户名称</label>
|
6
6
|
<div class="layui-input-inline">
|
7
|
-
<input type="text" name="name"
|
7
|
+
<input type="text" name="name" class="layui-input">
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="layui-inline">
|
@@ -4,13 +4,13 @@
|
|
4
4
|
<div class="layui-inline">
|
5
5
|
<label class="layui-form-label">所属商机</label>
|
6
6
|
<div class="layui-input-inline">
|
7
|
-
<input type="text" name="business"
|
7
|
+
<input type="text" name="business" class="layui-input">
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="layui-inline">
|
11
11
|
<label class="layui-form-label">单位</label>
|
12
12
|
<div class="layui-input-inline">
|
13
|
-
<input type="text" name="school"
|
13
|
+
<input type="text" name="school" class="layui-input">
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<div class="layui-inline">
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="layui-inline">
|
5
5
|
<label class="layui-form-label required">渠道名称</label>
|
6
6
|
<div class="layui-input-block" style="line-height: 36px;">
|
7
|
-
<input type="text" name="name" id="name" required lay-verify="required"
|
7
|
+
<input type="text" name="name" id="name" required lay-verify="required"
|
8
8
|
class="layui-input" value="<%= @place.name %>">
|
9
9
|
<%#= text_field_tag(:name, @place.name) %>
|
10
10
|
</div>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="layui-inline">
|
5
5
|
<label class="layui-form-label">渠道名称</label>
|
6
6
|
<div class="layui-input-inline">
|
7
|
-
<input type="text" name="name"
|
7
|
+
<input type="text" name="name" class="layui-input">
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="layui-inline">
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div class="layui-inline">
|
5
5
|
<label class="layui-form-label required">渠道名称</label>
|
6
6
|
<div class="layui-input-block">
|
7
|
-
<input type="text" name="name" required lay-verify="required"
|
7
|
+
<input type="text" name="name" required lay-verify="required"
|
8
8
|
class="layui-input" id="inputFocus">
|
9
9
|
</div>
|
10
10
|
</div>
|
@@ -15,6 +15,12 @@
|
|
15
15
|
<%= select_tag "business_type", options_for_select(EducodeSales::Common.where(clazz: 'business_type').where.not(extras: "x_class").pluck(:name, :id), params[:business_type]), { 'lay-filter': 'clazz_id', include_blank: true } %>
|
16
16
|
</div>
|
17
17
|
</div>
|
18
|
+
<div class="layui-inline m-t-10">
|
19
|
+
<label class="layui-form-label">顺序</label>
|
20
|
+
<div class="layui-input-inline">
|
21
|
+
<%= select_tag "sort_by", options_for_select([['', ''], ['升序', 'asc'], ['降序', 'desc']], params[:sort_by]), { include_blank: true } %>
|
22
|
+
</div>
|
23
|
+
</div>
|
18
24
|
<div class="layui-inline">
|
19
25
|
<button type="button" id="search_bt" class="business_bt layui-btn layui-btn-primary" lay-submit lay-filter="business_area">确定
|
20
26
|
</button>
|
@@ -10,7 +10,7 @@
|
|
10
10
|
<div class="layui-inline">
|
11
11
|
<label class="layui-form-label">用户名</label>
|
12
12
|
<div class="layui-input-inline large-select">
|
13
|
-
<input type="text" class="layui-input" id="name"
|
13
|
+
<input type="text" class="layui-input" id="name" name="name">
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<div class="layui-inline">
|
@@ -4,13 +4,13 @@
|
|
4
4
|
<div class="layui-inline">
|
5
5
|
<label class="layui-form-label">教师姓名</label>
|
6
6
|
<div class="layui-input-inline">
|
7
|
-
<input type="text" name="name"
|
7
|
+
<input type="text" name="name" class="layui-input">
|
8
8
|
</div>
|
9
9
|
</div>
|
10
10
|
<div class="layui-inline">
|
11
11
|
<label class="layui-form-label">单位</label>
|
12
12
|
<div class="layui-input-inline">
|
13
|
-
<input type="text" name="school"
|
13
|
+
<input type="text" name="school" class="layui-input">
|
14
14
|
</div>
|
15
15
|
</div>
|
16
16
|
<div class="layui-inline">
|
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.12
|
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-
|
11
|
+
date: 2022-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -105,7 +105,6 @@ 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
|
109
108
|
- app/assets/images/educode_sales/loading-0.gif
|
110
109
|
- app/assets/images/educode_sales/loading-1.gif
|
111
110
|
- app/assets/images/educode_sales/loading-2.gif
|
@@ -486,7 +485,7 @@ homepage: https://www.educoder.net
|
|
486
485
|
licenses:
|
487
486
|
- MIT
|
488
487
|
metadata: {}
|
489
|
-
post_install_message:
|
488
|
+
post_install_message:
|
490
489
|
rdoc_options: []
|
491
490
|
require_paths:
|
492
491
|
- lib
|
@@ -501,8 +500,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
501
500
|
- !ruby/object:Gem::Version
|
502
501
|
version: '0'
|
503
502
|
requirements: []
|
504
|
-
rubygems_version: 3.0.
|
505
|
-
signing_key:
|
503
|
+
rubygems_version: 3.0.0
|
504
|
+
signing_key:
|
506
505
|
specification_version: 4
|
507
506
|
summary: Summary of EducodeSales.
|
508
507
|
test_files: []
|
Binary file
|